#pragma once

#include <ros/ros.h>
#include <sensor_msgs/Imu.h>
#include <Eigen/Dense>

#include <memory>
#include <mutex>
#include <thread>
#include <queue>

#include <tf2/LinearMath/Quaternion.h>
#include <tf2/LinearMath/Matrix3x3.h>
#include <tf2_ros/transform_broadcaster.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>

std::queue<sensor_msgs::ImuConstPtr> imuQue;
std::mutex imu_lock;



std::deque<sensor_msgs::Imu> imu_bf;
std::mutex imu_bf_lock;

void callbackImu(const sensor_msgs::ImuConstPtr &msg);

void imuEulerIntegral();
void imuMedianIntegral();
void accProcess();